﻿using SmartCity.BasicData.Repo;
using SmartCity.BasicData.Repo.Impl;
using SmartCity.BasicData.Repo.Innerface;

namespace SmartCity.BasicData.Api.Extensions
{
    public static class ExtensionServiceColletion
    {
        /// <summary>
        /// 扩展方法注册仓储
        /// </summary>
        /// <param name="servers"></param>
        /// <returns></returns>
        public static IServiceCollection AddServer(this IServiceCollection servers) {

            servers.AddScoped(typeof(IBaseRepository<>),typeof(BaseReposity<>));
            servers.AddScoped<IAccountRepo, AccountRepo>();
            servers.AddScoped<ILogRepo, LogRepo>(); 

            return servers;
        }
    }
}
